package co.baiku.boot.job.service;

import co.baiku.boot.job.model.QuartzJobInfo;
import org.quartz.SchedulerException;

import java.util.List;

public interface QuartzJobService {
    List<QuartzJobInfo> list();

    @SuppressWarnings("unchecked")
    void addJob(QuartzJobInfo info);

    boolean edit(QuartzJobInfo info);

    boolean delete(String jobName, String jobGroup);

    boolean pause(String jobName, String jobGroup);

    boolean resume(String jobName, String jobGroup);

    boolean trigger(String jobName, String jobGroup);

    boolean checkExists(String jobName, String jobGroup) throws SchedulerException;
}
